<?php




add_option("qrCode_height", "");
add_option("qrCode_width", "");

// Process forms

if (isset($_POST["update_options"])) {
	if (empty($_POST["qrCode_height"])) {
		update_option("qrCode_height", "");
	} else {
		update_option("qrCode_height", $_POST["qrCode_height"]);
	}

	if (empty($_POST["qrCode_width"])) {
		update_option("qrCode_width", "");
	} else {
		update_option("qrCode_width", $_POST["qrCode_width"]);
	}
}

// Initialization

$qrCode_height = get_option("qrCode_height");
$qrCode_width=get_option("qrCode_width");


?>

<div class="wrap">
	<h2>QR Codes </h2>

    <p>
	To show your QR Code you will need to add a little tag into the layout. 
	Open your layout files (usually under Presentation/Theme Editor. e.g: <code>index.php</code>) and identify where you want to place the qrcode image, then insert this PHP code snippet:<strong>
				<code><!-- qrcode -->
&lt;?php getQrCode::getPermalinkQrCode();?&gt;
</code></strong>
		</p>


	<form method="post">
		<fieldset class="options">
			<legend>Options</legend>

			<p>You can adjust the size of the published QR Code by entering the appropriate values here			<p>
			<table class="editform optiontable">
				<tr>
					<th width="33%" valign="top"><label for="qrCode_height">Image height:</label></th>
					<td>
						<input type="text" id="qrCode_height" name="qrCode_height" size="5" value="<?php echo $qrCode_height ; ?>" /><br />
					</td>
				</tr>
				<tr>
					<th width="33%" valign="top"><label for="qrCode_width">Image width:</label></th>
					<td>
						<input type="text" id="qrCode_width" name="qrCode_width" size="5" value="<?php echo $qrCode_width ; ?>" /><br />
					</td>
				</tr>
			</table>
			
		</fieldset>

		<p class="submit">
			<input name="update_options" value="Update Options &raquo;" type="submit" />
		</p>
	</form>


	
</div>
